<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no" />
		<title>速翔网络 - QQ技术：1424445608</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
		<style>
			.t{
				background: #D43D3D;
				color: #fff;
				text-align: center;
			}
			.t .text{
				padding: 1rem 0;
				padding-top: 2rem;
			}
			.t p{
				color: #fff;
				font-size: 0.65rem;
				opacity: 0.5;
				padding-bottom: 0.5rem;
			}
			.t span{
				font-size: 0.75rem;
				padding-right: 0.25rem;
			}
			.t b{
				font-size: 1.5rem;
				letter-spacing: 2px
			}
			.f{
				padding:1rem;
			}
			.f .h4{
				font-size: 0.75rem;
			}
			.f .f1 .text input{
				border: 1px solid #f8f8f8;
				padding:0 0.35rem;
				border-radius: 0.35rem;
				margin: 0.75rem 0;
				font-size: 0.75rem;
			}
			.list {
				margin:0 -0.35rem;
				padding-top: 0.5rem;
			}
			.list .aui-col-xs-4{
			}
			.list div.money{
				border: 1px solid #ddd;
				margin: 0.35rem;
				text-align: center;
				padding: 0.75rem 0;
				font-size: 0.75rem;
				font-weight: bold;
				color: #555;
			}
			.list div.a .money{
				border: 1px solid #D43D3D;
				color: #D43D3D;
			}
			.f .content{
				padding: 0.75rem 0;
			}
			.f .content h5{
				font-size: 0.75rem;
				padding-bottom: 0.35rem;
			}
			.f .content p{
				font-size: 0.75rem;
				padding: 0.25rem 0;

			}
			.btn{
				width: 100%;
				margin-bottom: 2rem;
			}
			.btn div{
				width: 88%;
				text-align: center;
				margin: 0 auto;
				background: #D43D3D;
				color: #fff;
				padding: 0.5rem 0;
				border-radius: 2rem;
			}
		</style>
	</head>
	<body>
		<div class="aui-content">
			<div class="t">
				<div class="text"><p>当前金币</p><div><b id="moneya">0</b></div></div>
			</div>
			<div class="f">
				<div class="f1">
					<div class="h4">金币兑换 LDT</div>
					<div class="text">
						<input type="tel" name="" value="" placeholder="请填写数字兑换LDT">
					</div>
					<div style="color:#f00" id="duihuan_config"></div>
				</div>
<!--
				<div class="content">
					<h5>注意事项</h5>
					<p>1.提币将在24小时内审核</p>
					<p>2.请确保您的地址为ERC20正确地址，如有误将无法找回资产</p>
				</div> -->
			</div>
		</div>
		<div class="btn" tapmode onclick="tixian()">
			<div>立即兑换</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/doT.js"></script>
	<script type="text/javascript" src="../../script/ffxiang.js"></script>
	<script type="text/javascript">
		apiready = function() {
			$api.text($api.dom('#moneya'),$api.getStorage('user').yaoqing.jinbi)
			$api.text($api.dom('#duihuan_config'),$api.getStorage('config').config.duihuan+'金币 = 1LDT')
			api.parseTapmode();

		}
		function tixian(){

			var money = $api.val($api.dom('input'));
			if(!money){
				return _msg('请填写兑换金额！');
			}
			_loading();
			_ajax('api/yaoqing/jinbi_duihuan',function(ret,err){
				_loadingCloes();
				if(ret){
					console.log(JSON.stringify(ret))
					if(ret.ret){
						_userInfo();
						_alert(ret.ret,function(ret,err){
							_close();
						})
					}else{
						_msg(ret.err)
					}
				}else{
					_alert(JSON.stringify(err));
				}
			},{money:money})
		}
	</script>
</html>
